<?php
$v_filter = "";
$v_filter = "%". $v_filter . "%";
$v_creator_id = $_SESSION['staff_id'];
$v_status = 1;
if(isset($_REQUEST['hdn_af_id'])){
	$v_af_id = $_REQUEST['hdn_af_id'];
}
if(_is_sqlserver()){
	if ($v_af_id > 0 ) {
		$sql = "Onegate_AfCreatorAgencyGetAll  ";
		$sql = $sql . $v_status;
		$sql = $sql .",'". $v_filter."'";
		$sql = $sql .",'". $v_creator_id."'";
		$result = @mssql_query($sql,$conn);	
		$arr_all_agency_creator = _get_row_to_array($result);
	} else {
		$cmd = @mssql_init("Onegate_AgencyGetAll", $conn);
		@mssql_bind($cmd, "@p_filter", $v_filter, SQLVARCHAR);
		@mssql_bind($cmd, "@p_status", $v_status, SQLINT4);
		$result_all_agency_creator = @mssql_execute($cmd);
		$arr_all_agency_creator = _get_row_to_array($result_all_agency_creator);
		@mssql_free_result($result_all_agency_creator);
	}
}
?>